|
|
|
| Table 4.2 Form Editor Toolbar Buttons | | Name | Function | | Bring to Front | Moves the selected control in front of other controls on the form | | Send to Back | Moves the selected control behind other controls on the form | | Align | Lines up a group of controls | | Center | Centers a group of controls | | Make Same Size | Resizes a group of controls to match | | Lock Controls Toggle | Prevents movement or resizing of controls with the mouse (however, the controls can still be modified with the Properties window) |
|
|
|
|
|
|
Using the Form Editor toolbar, you can manipulate the position and size of a group of controls. The Align button allows you to align the left, right, top, or bottom edges of a group of controls. Although you can align the left and top edges of a group by setting the Left and Top properties directly, you cannot align the right or bottom edges directly. The Align button also allows you to line up the vertical or horizontal centers of the controls. You cannot make this change directly with the properties. To choose which type of alignment to use, click the arrow button to the right of the Align button. This action displays a menu from which you can pick the alignment. You can also choose to align all the selected controls to the grid. Aligning the controls this way causes the upper-left corner of each control to be moved so that it is touching the grid point nearest its current location. |
|
|
|
|
|
|
|
|
Another task that was tedious in earlier versions of Visual Basic was centering controls on the form. This task has also been made easy using the Form Editor toolbar. Next to the Align button is the Center button. This button allows you to center the group of controls horizontally or vertically within the form. The entire group is centered as if it were a single control; the relative position of each control in the group remains the same. As with the alignment options, you select the type of centering you want from a pop-up menu that appears when you click the arrow button next to the Center button. |
|
|
|
|
|
|
|
|
The Make Same Size button allows you to make the height and/or width of all the controls in the group the same. Although you can do so by setting the appropriate properties, the Form Editor makes this task much more convenient. Figure 4.25 shows a group of controls made the same size as well as centered horizontally within the form. |
|
|
|
|
|